<?php

namespace App\Transformers;


use App\Models\Evaluate;
use League\Fractal\TransformerAbstract;

class EvaluationTransformer extends TransformerAbstract
{

    public function transform(Evaluate $item)
    {
        return [
            'id' => $item['id'],
            'stuname' => $item->student->name ,
            'stuphoto' => $item->student->photo ,
            'overall'=>$item['overall'],
            'part' => $item['part'],
            'evaluatetime' => $item['evaluatetime'] ,
            'srvmanner'=>$item['srvmanner'],
            'teachlevel' => $item['teachlevel'],
            'coachreply' => $item['coachreply'],
            'coachreplytime' => $item['coachreplytime'],
            'schoolreply' => $item['schoolreply'],
            'schoolreplytime' =>  $item['schoolreplytime']
        ];
    }


}
